﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using slimPickins.Tools.PropParser;

namespace slimPickins.Forms.PropEditor
{
    public partial class frmPropEditor : Form
    {
        List<BuildPropParser.propValuesStruct> values;


        public frmPropEditor(List<BuildPropParser.propValuesStruct> propValues)
        {
            values = propValues;
            InitializeComponent();
        }

        private void frmPropEditorcs_Load(object sender, EventArgs e)
        {
            for (int i = 0; i < values.Count(); i++)
            {
                ListViewItem tmpItem = new ListViewItem();

                tmpItem.Text = values[i].Name;
                tmpItem.SubItems.Add(values[i].Value);

                lstPropView.Items.Add(tmpItem);
            }
        }

        private void chkAllowEdit_CheckedChanged(object sender, EventArgs e)
        {
            lstPropView.LabelEdit = chkAllowEdit.Checked;
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            this.Close();
        }


    }
}
